<?php
$status = new Status();
$idUser = elgg_get_logged_in_user_guid();
$idLesson = $_SESSION["idLesson"];
?>

<div id="ListDanhMuc">
    <a href="vocabulary">
        <div class ="box_menu">
            <?php
            $isVocabulary = $status->GetStatusVocabulary($idUser, $idLesson);
            if ($isVocabulary == 1) {
                ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/vocabularied.jpg" alt="Vocabulary"/>
                <?php
            } else {
                ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/vocabulary.jpg" alt="Vocabulary"/>
            <?php } ?>

            Vocabulary
        </div> </a>


    <a href="grammar">
        <div class ="box_menu">
            <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/grammar.jpg" alt="Grammar"/>
            Grammar
        </div></a>


    <a href="<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/MyCourse/loadlisten'); ?>">
        <div class ="box_menu">
<?php
$isLearn = $status->GetStatusListen($idUser, $idLesson);
if ($isLearn == 1) {
    ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/listened.png" alt="Listen"/>
                <?php
            } else {
                ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/listen.jpg" alt="Listen"/>
            <?php } ?>
            Listen
        </div>
    </a>

    <a href="<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/MyCourse/loadWrite'); ?>">
        <div class ="box_menu">
            <?php
          //  $isWrite = $status->GetStatusWrite($idUser, $idLesson);
            if (0) {
                ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/writed.jpg" alt="Writed"/>
                <?php
            } else {
                ?>
                <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/write.jpg" alt="Write"/>
            <?php } ?>
            Writing
        </div>
    </a>

    <a href="<?php echo elgg_add_action_tokens_to_url($vars['url'] . 'action/MyCourse/loadTest'); ?>">
        <div class ="box_menu">
            <img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/LessonMenu/test.jpg" alt="Test"/>
            Test
        </div>
    </a>
</div> <!-- end ListDanhMuc -->